﻿using System;
using System.Windows.Data;

namespace AnthStat.WPF.Applications.Converters
{
    public sealed class PlusOneConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            // TODO: Code contracts

            double size = ((double)value) + 1;

            return size;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            // TODO: Code contracts

            double size = ((double)value) - 1;

            return size;
        }
    }
}
